package com.uzai.console.mapper;

import com.uzai.console.entity.RobotCmd;
import com.uzai.console.entity.SysPlugin;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RobotCmdMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int deleteByKey(@Param("merId") Long merId, @Param("configId") Long configId,  @Param("key") String key);

    int deleteByConfigId(@Param("merId") Long merId, @Param("configId") Long configId);

    int insert(RobotCmd record);

    int insertSelective(RobotCmd record);

    RobotCmd selectById(@Param("id") Long id, @Param("merId") Long merId);

    RobotCmd selectByConfigIdAndVal(@Param("configId") Long configId, @Param("val") String val);

    List<RobotCmd> selectByConfigId(@Param("merId") Long merId, @Param("configId") Long configId);

    int updateByIdSelective(RobotCmd record);

    int updateById(RobotCmd record);

    /**
     * 批量添加
     * @param list
     * @return
     * @return
     */
    int batchAdd(List<RobotCmd> list);

    /**
     * 批量删除
     * @param list
     * @return
     */
    int batchDelete(List<Long> list);


}